package com.bang.study.spring.processor;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.stereotype.Component;

/**
 * @ClassName: MyBeanFactoryProcessor
 * @author: BANG
 * @Date: 2019/11/13 16:38
 * @Version: 1.0
 * @Modified By:
 * @Desc: TODO
 */
@Component
public class MyBeanFactoryProcessor implements BeanFactoryPostProcessor {
    @Override
    public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
        int beanDefinitionCount = beanFactory.getBeanDefinitionCount();
        System.out.println("创建了多个个bean: ========= "+beanDefinitionCount);
    }
}
